package com.leancloud.login;

import android.os.Bundle;
import android.support.v4.app.Fragment;

import com.leancloud.login.fragment.PersonalFragment;
import com.leancloud.login.user.UserGlobal;

import tech.com.commoncore.basecomponent.service.ILoginService;
import tech.com.commoncore.user.CurrentUser;

/**
 * Anthor:NiceWind
 * Time:2019/3/22
 * Desc:The ladder is real, only the climb is all.
 */
public class LoginService implements ILoginService {

    @Override
    public CurrentUser getCurrentUser() {
        return UserGlobal.getUserImp().getCurrentUser();
    }

    @Override
    public void logout() {
        UserGlobal.getUserImp().logout(null);
    }

    @Override
    public Fragment newUserFragment(Bundle bundle) {
        return PersonalFragment.newInstance();
    }
}
